package com.ruoyi.camp.domain;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.ruoyi.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * 微信登录用户实体类
 *
 * @auth zhaoly
 * @date 2024-01-30 0:30
 */

@ApiModel(value = "CampLoginUser", description = "微信登录用户实体类")
public class CampLoginUser {


    /**
     * UUID
     */
    @ApiModelProperty("UUID(必填)")
    private String userId;

    /**
     * 微信id
     */
    @Excel(name = "微信openId")
    @ApiModelProperty("微信openId(必填)")
    private String openId;


    /**
     * 登录token
     */
    @ApiModelProperty("服务设施类型的状态，0：停用 1：启用")
    private String token;


    /**
     * 归属部门
     */
    @ApiModelProperty("归属部门")
    private String deptName;


    /**
     * 用户名
     */
    @ApiModelProperty("用户名")
    @Excel(name = "用户名")
    private String username;

    /**
     * 用户头像
     */
    @ApiModelProperty("用户头像")
    @Excel(name = "用户头像")
    private String imageUrl;

    /**
     * 手机号
     */
    @ApiModelProperty("手机号")
    @Excel(name = "手机号")
    private String phone;

    /**
     * 密码
     */
    @ApiModelProperty("密码")
    private String password;

    /**
     * 用户状态(-1登录失败，0正常，1已注册，未审核，2已注册，审核不通过，3禁用)
     */
    @ApiModelProperty("用户状态(-1登录失败，0正常，1已注册，未审核，2已注册，审核不通过，3禁用)")
    private Integer status;

    /**
     * 用户状态说明
     */
    @ApiModelProperty("用户状态说明")
    private String msg;

    /**
     * 构造方法
     *
     * @param status -1登录失败，0正常，1已注册，未审核，2已注册，审核不通过，3禁用
     * @param msg    登录消息
     */
    public CampLoginUser(String username, String deptName, int status, String msg) {
        this.username = username;
        this.deptName = deptName;
        this.status = status;
        this.msg = msg;
    }

    /**
     * 构造方法
     *
     * @param username 登录用户名
     * @param deptName 归属部门名
     * @param token    登录token
     */
    public CampLoginUser(String username, String deptName, String token) {
        this.username = username;
        this.deptName = deptName;
        this.token = token;
        this.status = 0;
    }

    public CampLoginUser(String username, String deptName, String token, CampUser campUser) {
        this.username = username;
        this.deptName = deptName;
        this.token = token;
        this.status = 0;
        this.userId = String.valueOf(campUser.getUserid());
        this.openId = String.valueOf(campUser.getOpenid());
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getUserId() {
        return userId;
    }

    public void setOpenId(String openId) {
        this.openId = openId;
    }

    public String getOpenId() {
        return openId;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getImageUrl() {
        return imageUrl;
    }

    public void setImageUrl(String imageUrl) {
        this.imageUrl = imageUrl;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    @JsonIgnore
    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getDeptName() {
        return deptName;
    }

    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
